﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="UserHierarchy.aspx.cs" Inherits="MLM.AdminCP.Pages.UserHierarchy" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .MLMHiearchyItem { background: none repeat scroll 0 0 #333333; border: 3px solid #333333; color: #FFFFFF; font-size: 13px !important; }
        .MLMHiearchySelectedItem { background: #3388DD; border: solid 3px #3388DD; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <asp:Label runat="server" ID="lbuserhierachy" Text="User Hierarchy" 
        meta:resourcekey="lbuserhierachyResource1"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <h3>
        
        <asp:Label runat="server" ID="lbFilter" Text="Filter" 
            meta:resourcekey="lbFilterResource1"></asp:Label>
    </h3>
    
    <asp:Label runat="server" ID="lbUserID" Text="User ID:" 
        meta:resourcekey="lbUserIDResource1"></asp:Label>
    <telerik:RadTextBox runat="server" ID="UserIDTxt" 
        meta:resourcekey="UserIDTxtResource1" Width="125px" />
    <asp:Button runat="server" Text="View Hierarchy"
        ID="ViewHierarchyBtn" meta:resourcekey="ViewHierarchyBtnResource1" />
    <h3>
        
        <asp:Label runat="server" ID="lbHierachyChart" Text="Hierachy Chart" 
            meta:resourcekey="lbHierachyChartResource1"></asp:Label></h3>
    <div id="chart_div">
    </div>
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
        google.load('visualization', '1', { packages: ['orgchart'] });
        google.setOnLoadCallback(drawChart);
        function drawChart() {
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Name');
            data.addColumn('string', 'Manager');
            data.addColumn('string', 'ToolTip');
            data.addRows([<%=Template %>]);
            var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
            chart.draw(data, {
                allowHtml: true,
                allowCollapse: true,
                large: 'large',
                nodeClass: 'MLMHiearchyItem',
                selectedNodeClass: 'MLMHiearchySelectedItem'
            });
        }
    </script>
</asp:Content>
